package com.changgou.pay.feign;

import com.changgou.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author kfzhao
 * @version 1.0
 * @interfaceName PayFeign
 * @description
 * @date 2022/1/4 18:28
 **/
@FeignClient(name = "pay")
public interface PayFeign {

    @GetMapping("/wxpay/nativePay")
    Result nativePay(@RequestParam("orderId") String orderId, @RequestParam("money") Integer money);

    @GetMapping("/wxpay/query/{orderId}")
    Result queryOrder(@PathVariable("orderId") String orderId);

    @PutMapping("/wxpay/close/{orderId}")
    public Result closeOrder(@PathVariable("orderId") String orderId);
}
